package sources;

public class DeterministicSource extends RandomSource {

	private static final int THE_ANSWER_TO_LIFE_THE_UNIVERSE_AND_EVERYTHING = 42;

	public String getSourceName() {
		return "Deterministic Source";
	}

	// Does not conform to RFC 1149.5, but is close enough.
	protected void generateNext() {
		addToPools(THE_ANSWER_TO_LIFE_THE_UNIVERSE_AND_EVERYTHING);
		addRawData(THE_ANSWER_TO_LIFE_THE_UNIVERSE_AND_EVERYTHING);
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	protected void openResources() {
		// Nothing
	}

	protected void closeResources() {
		// Nothing
	}
	
}
